<%--
  Created by IntelliJ IDEA.
  User: LENOVO
  Date: 2020/8/20
  Time: 16:26
  To change this template use File | Settings | File Templates.
--%>
<%@ page import="java.sql.Connection" %>
<%@ page import="java.sql.PreparedStatement" %>
<%@ page import="java.sql.ResultSet" %>
<%@ page import="java.sql.DriverManager" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
    String eid=request.getParameter("eid");
%>
    <%!
   public static final String DBDriver="com.mysql.jdbc.Driver";
   public static final String DBUrl="jdbc:mysql://localhost:3306/invoicing_system";
   public static final String DBUserName="root";
   public static final String DBPwd="root";
%>

<%
    Connection conn=null;
    PreparedStatement ps=null;
    ResultSet rs=null;
    Class.forName(DBDriver);
    String suppName=(String)request.getSession().getAttribute("SloginedName");
    conn= DriverManager.getConnection(DBUrl,DBUserName,DBPwd);
    String sql="delete form equipment,production where eid=? and sid='"+suppName+"'";
    ps=conn.prepareStatement(sql);
    ps.setString(1,eid);
    ps.executeUpdate();
%>
</body>
</html>
